import service from '@/utils/request'


export function loginService(userAccount, password) {
    return service({
        url: "/user/login",
        method: "post",
        data: { userAccount, password },
    })
}

export function getUserInfoService() {
    return service({
        url: "/user/info",
        method: "get",
    });
}

export function logoutService() {
    return service({
        url: "/user/logout",
        method: "delete",
    });
}

// 注册接口
export function registerService(data) {
    return service({
        url: "/user/register",
        method: "post",
        data
    });
}

// 发送邮箱验证码接口
export function sendEmailCodeService(data) {
    return service({
        url: "/user/sendEmailCode",
        method: "get",
        params: data // 将数据放在params中
    });
}

export function getHotUserListService() {
    return service({
        url: "/user/getHotUser",
        method: "get",
    });
}

export function getTotalService() {
    return service({
        url: "/user/getTotal",
        method: "get",
    });
}
